﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using DevExpress.Utils;

namespace ECare.Win
{
    public class CommonBackgroundWorker:BackgroundWorker
    {
        public CommonBackgroundWorker()
        {
            this.DoWork += CommonBackgroundWorker_DoWork;
        }

        public  DelegateFunction m_delegateFunction = null;

        public object[] arags { get; set; }

        void CommonBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {

            if (m_delegateFunction != null)
            {e.Result=m_delegateFunction.DynamicInvoke(arags);
            }
            else
            {
                e.Result = null;
            }

        }
    }

    public delegate void DelegateFunction(string strFuncName);

}
